#ifndef _SOUND_RECORDER_H_
#define _SOUND_RECORDER_H_

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

typedef struct {
    int channels;
    int bitsPerSample; 
    int sampleRate; 
    int sampleRequest;
} SoundRecorderAudioFormat;

typedef void (*fnAudioRecordHandle) (char *buf,
                                     int len,
                                     void* ctx);

__declspec(dllexport) bool Create_SoundRecorder(void** recorder);

__declspec(dllexport) bool Destroy_SoundRecorder(void* recorder);

__declspec(dllexport) bool Start_SoundRecord(void* recorder, 
                                             SoundRecorderAudioFormat fmt, 
                                             fnAudioRecordHandle acb, 
                                             void* actx);

__declspec(dllexport) bool Stop_SoundRecord(void* recorder);

#ifdef __cplusplus
}
#endif // __cplusplus

#endif